package com.zygh.policeasset.controller;
import com.zygh.policeasset.pojo.AssetsUpdate;
import com.zygh.policeasset.service.AssetsUpdateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RequestMapping({"/assetsUpdate"})
@Api(tags = {"资产维修信息提交"})
@RestController
public class AssetsUpdateController {

    @Autowired
    AssetsUpdateService assetsUpdateService;

    @PostMapping(value = "/add")
    @ApiOperation("添加")
    public Object add(@RequestBody AssetsUpdate assetsUpdate) {

        return assetsUpdateService.add(assetsUpdate);
    }

    @GetMapping(value = "/findById")
    @ApiOperation("根据id查询")
    public Object findById(@RequestParam Integer id) {

        return assetsUpdateService.findById(id);
    }
}